home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / Visual Cafe Pro v1.0 / SOURCE.BIN / TvEventHandler.java < prev    next >
Encoding:
Java Source  |  1997-06-19  |  2.4 KB  |  71 lines

  1. /*
  2.  * TvEventHandler.java   1.0   12 Jan 1997
  3.  *
  4.  * Copyright (c) 1996 Krumel & Associates, Inc.  All Rights Reserved.
  5.  *
  6.  * This software is provided as is.  Krumel & Associates shall not be liable
  7.  * for any damages suffered by licensee as a result of using, modifying or
  8.  * distributing this software or its derivatives.
  9.  */
  10.  
  11. package symantec.itools.db.awt;
  12.  
  13. import java.awt.Event;
  14.  
  15. /**
  16.  * Interface defines the API required by classes to act as handler of events and
  17.  * exceptions.  EventHandlers receive events generated by cells, headings, and the
  18.  * table.  When an exception occurs within the Grid framework, the exceptions are
  19.  * passed to the event handler for processing.  Each application can handle the
  20.  * events and exceptions as appropriate.
  21.  */
  22. public interface TvEventHandler {
  23.     /**
  24.      * Called by the grid when an event handler is set to allow the handler to make
  25.      * any API calls to customize the grid.
  26.      */
  27.     void setupView(Grid v);
  28.  
  29.     /**
  30.      * Called when a cell level event is generated, ie the cell is not a part
  31.      * of a heading.
  32.      * @param e The cell event
  33.      * @param cell The cell that generated the event.
  34.      */
  35.     boolean handleCellEvent(Event e, TableCell cell);
  36.  
  37.     /**
  38.      * Called when a column heading cell event is generated.
  39.      * @param e The cell event
  40.      * @param cell The cell that generated the event.
  41.      */
  42.     boolean handleColHeadingEvent(Event e, TableCell cell);
  43.  
  44.     /**
  45.      * Called when a row heading cell event is generated.
  46.      * @param e The cell event
  47.      * @param cell The cell that generated the event.
  48.      */
  49.     boolean handleRowHeadingEvent(Event e, TableCell cell);
  50.  
  51.     /**
  52.      * Called when corner cell heading cell event is generated.
  53.      * @param e The cell event
  54.      * @param cell The cell that generated the event.
  55.      */
  56.     boolean handleCornerCellEvent(Event e, TableCell cell);
  57.  
  58.     /**
  59.      * Called when toolbar component generates an event.
  60.      * @param e The cell event
  61.      * @param cell The cell that generated the event.
  62.      */
  63.     boolean handleToolbarEvent(Event e);
  64.  
  65.     /**
  66.      * Called when an exception is generated within the Grid framework.
  67.      * @param pos The cell position that generated the exception
  68.      * @param exc The actual exception thrown
  69.      */
  70.     void handleException(Coordinate pos, Exception exc);
  71. }